package com.baseframe.jwt.props;

import com.baseframe.jwt.constant.BaseJwtConstant;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

@Data
@ConfigurationProperties("base.token")
public class BaseJwtProperties {
    /**
     * 是否只能同时在线一人
     */
    private Boolean single = Boolean.FALSE;

    private String signKey ;

    public String getSignKey() {
        if (signKey==null||signKey.length()< BaseJwtConstant.KEY_LENGTH){
            return BaseJwtConstant.DEFAULT_SIGN_KEY;
        }
        return signKey;
    }
}
